<?php

namespace XWAM\Addon\POrgSystem\Controller;

/**
 * Description of VarConfigController
 *
 * @since 1.0 <2015-10-20> SoChishun <14507247@qq.com> Added.
 */
class VarConfigController extends \XWAM\Controller\AppbaseController {
    function var_config(){
        $list=AddonD('Config')->get_list();
        $this->assign('list',$list);
        $this->display_cpp();
    }
    function var_edit($id){
        $this->assign('data',AddonD('Config')->find($id));
        $this->display();
    }
    function var_edit_save(){
        $result=AddonD('Config')->save_var();
        $this->dialogJump($result['status'],$result['info']);
    }
    function var_delete($id=''){
        $result=AddonD('Config')->remove_var($id);
        $this->ajaxReturn($result);
    }
}
